package com.songxh.infrastructure.db.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.github.pagehelper.Page;
import com.songxh.application.dto.details.CategorySummaryDTO;
import com.songxh.application.dto.details.TimeSummaryDTO;
import com.songxh.application.dto.home.ArticleDTO;
import com.songxh.infrastructure.db.pojo.Article;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * @author songxh
 * @create 2022-12-19-15:50
 */
public interface ArticleMapper extends BaseMapper<Article> {

    Page<ArticleDTO> getArticleData(Map<String,Object> params);

    List<Long> getTags(@Param("articleId") Long articleId);

    List<CategorySummaryDTO> getCategorySummary(@Param("authorId")Long authorId);

    List<TimeSummaryDTO> getTimeSummary(@Param("authorId")Long authorId);
}
